pkgname=rocksdb
pkgver=git
pkgrel=1
pkgdesc='Embedded key-value store for fast storage'
arch=(i386 x86_64)
url='http://rocksdb.org'
license=(Apache leveldb)
depends=()
source=(https://github.com/facebook/rocksdb.git)
md5sums=('SKIP')

prepare() {
  cd rocksdb
  sed -e 's/\bpython\b/python2/' -i Makefile
}

build() {
  cd rocksdb
  make release
}

package() {
  cd rocksdb
  install -d "$pkgdir"/usr/share/rocksdb
  rm tools/*.o
  rm tools/*.d
  cp -r tools "$pkgdir"/usr/share/rocksdb
  install -m755 -D db_bench "$pkgdir"/usr/share/rocksdb/tools
}
